#!/bin/bash
#This needs to be executed from within the destination directory
currdir=$PWD
olddir=$PWD/../ebtables2/userspace/ebtables2
cd $olddir
regexp="find . -name \"*.c\";"
regexp=$regexp"find . -name \"*.h\";find . -name \"Makefile\";"
regexp=$regexp"find . -name \"ethertypes\";find . -name \"ChangeLog\";"
regexp=$regexp"find . -name \"COPYING\";find . -name \"INSTALL\";"
regexp=$regexp"find . -name \"THANKS\";find . -name \"perf_test\" -type f;"
regexp=$regexp"find . -name \"*.8\";find . -name \"ebtables-save\";"
regexp=$regexp"find . -name \"ebtables-config\";find . -name \"*sysv\";"
regexp=$regexp"find . -name \"ebtables.spec\";"
cd - > /dev/null
mkdir -p $currdir/include
mkdir -p $currdir/examples/perf_test
mkdir -p $currdir/examples/ulog
mkdir -p $currdir/extensions
cd $olddir
for a in `eval $regexp`
do
  install -m 0644 -o $USER -g $USER $olddir/$a $currdir/$a
done
cd - > /dev/null
